<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/css/normalize.css">
    <link rel="stylesheet" href="/css/reset.css">
    <title>管理员编辑图书</title>
    <style>
      input{
        display: block;
      }
      textarea{
        display: block;
      }
    </style>
  </head>
  <body>
    <div style="color:red;" th:text="${emsg}"></div>
    <form action="/book/updateBook" method="post">
      编号：<input type="text" name="id" readonly th:value="${editBook.id}">
      书名：<input type="text" name="bookName" th:value="${editBook.bookName}">
      作者：<input type="text" name="author" th:value="${editBook.author}">
      类型：<select name="typeId">
        <option value="">请选择</option>
        <option th:selected="${type.key}==${editBook.typeId}" th:each="type : ${typeMap}" th:value="${type.key}" th:text="${type.value}"></option>
      </select>
      出版社：<input type="text" name="publisher" th:value="${editBook.publisher}">
      ISBN：<input type="text" name="isbn" th:value="${editBook.isbn}">
      库存：<input type="text" name="count" th:value="${editBook.count}">
      价格：<input type="text" name="price" th:value="${editBook.price}">
      介绍：<textarea type="text" name="description" rows="20" cols="60" th:text="${editBook.description}"></textarea>
      <input type="submit" value="修改">
    </form>
  </body>
</html>